<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="html"/>

<xsl:template match="/issues">
<html>
<head>
<title>Siebel Code Analyzer results</title>
<style>
body { margin: 10px;
       padding: 0px;
       font-size: medium;
       color: rgb(0, 0, 0);
       font-family: verdana,times new roman,helvetica;
     }

th { background-color: rgb(200, 200, 200);
     color: rgb(0, 0, 0);
     border: 1px solid rgb(200, 200, 200);
    padding: 4px;
   }

td { border: 1px solid rgb(200, 200, 200);
     background-color: rgb(255, 255, 255);
     empty-cells: show;
     padding: 4px;
     text-align: center;
   }

table { border: 0px;
        border-collapse: collapse;
  		  margin-left: inherit;
      }
</style>
</head>
<body>
<h1>Total issues found: <xsl:value-of select="count(/issues/issue)"/></h1>
<table>
    <tr>
      <th>Repository Name</th>
      <th>Object Type</th>
      <th>Object Name</th>
      <th>Function</th>
      <th>Last Changed</th>
      <th>Open variable name</th>
      <th>Assign Method</th>
    </tr>
				<xsl:for-each select="/issues/issue">
				<xsl:sort select="objectType"/>
				<xsl:sort select="objectName"/>
						<tr>
								<td><xsl:value-of select="repository"/></td>
								<td><xsl:value-of select="objectType"/></td>
								<td><xsl:value-of select="objectName"/></td>
								<td><xsl:value-of select="function"/></td>
								<td><xsl:value-of select="lastChangeDate"/></td>
								<td><xsl:value-of select="openVariable"/></td>
								<td><xsl:value-of select="assignMethod"/></td>
						</tr>
				</xsl:for-each>
</table>
<p>Report created with <xsl:value-of select="system-property('xsl:vendor')" /> XSLT processor, version <xsl:value-of select="system-property('xsl:version')"/>.</p>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
